<h2 style="margin-left: 15%">Administración de flotas</h2>
<div class="MiBoton1">
	<%= link_to 'Nueva flota', new_fleet_path, :class => "MiBoton1" %>
</div>
<% if @fleets.size == 0 then %>
	<p style="margin-left: 15%">No se han registrado flotas<p>
<% else %>
<table id="MiTabla1">
  <tr>
		<th class="MiHeader1">Adquisicion</th>
    <th class="MiHeader1">Marca</th>
    <th class="MiHeader1">Modelo</th>
    <th class="MiHeader1">Año</th>
    <th class="MiHeader1">Servicio</th>
    <th class="MiHeader1">Nro. buses</th>
		<th class="MiHeader1">Acciones</th>
  </tr>

<% @fleets.each do |fleet| %>
  <tr>
    <td class="MiCelda1" style="text-align: center"><%= fleet.fechaAdquisicion.strftime("%d/%m/%Y") %></td>
    <td class="MiCelda1"><%= fleet.marca %></td>
    <td class="MiCelda1"><%= fleet.modelo %></td>
    <td class="MiCelda1" style="text-align: center"><%= fleet.anhoFabricacion %></td>
    <td class="MiCelda1" style="text-align: center"><%= fleet.service_type.descripcion %></td>
    <td class="MiCelda1" style="text-align: right"><%= fleet.numBuses %></td>
    <td style="text-align: center">
		<%= link_to image_tag("ver.gif", :size => "15x15"), fleet %>
		<%= link_to image_tag("editar.png", :size => "15x15"), edit_fleet_path(fleet) %>
		<%= link_to image_tag("eliminar.png", :size => "15x15"), fleet, :confirm => 'Are you sure?', :method => :delete %>
		</td>
  </tr>
<% end %>
</table>
<% end %>
<br />
